package com.tt.plat8.view.base;

import com.tt.plat8.api.security.IRoleProvider;
import com.tt.plat8.core.manager.RolesManager;

/**
 * Created with IntelliJ IDEA.
 * User: tangtao
 * Date: 14-2-20
 * Time: 下午4:44
 * To change this template use File | Settings | File Templates.
 */
public class RolesListener {

    /**
     * 监听角色提供者
     * @param roleProvider
     */
    public void bind(IRoleProvider roleProvider){
          RolesManager.getInstall().add(roleProvider);
    }

    /**
     * 解除角色提供者
     * @param roleProvider
     */
    public void unbind(IRoleProvider roleProvider){
        RolesManager.getInstall().remove(roleProvider);
    }
}
